import config from "@/config"
import http from "@/utils/request"
export default {
    coupon:{
        add: {
            url: `${config.API_URL}/main/mall/coupon/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/mall/coupon/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        save: {
            url: `${config.API_URL}/main/mall/coupon/save`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        update: {
            url: `${config.API_URL}/main/mall/coupon/update`,
            name: "更新",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        tree: {
            url: `${config.API_URL}/core/reportCoreService/query`,
            name: "数状图",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        }
},
promotion:{
    base:{
        add: {
            url: `${config.API_URL}/main/mall/promotion/base/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/mall/promotion/base/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        save: {
            url: `${config.API_URL}/main/mall/promotion/base/save`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        update: {
            url: `${config.API_URL}/main/mall/promotion/base/update`,
            name: "更新",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        }
    },
    goods:{
        add: {
            url: `${config.API_URL}/main/mall/promotion/goods/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/mall/promotion/goods/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        saveOrUpdate: {
            url: `${config.API_URL}/main/mall/promotion/goods/saveOrUpdate`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        queryGoodsSkuList: {
            url: `${config.API_URL}/main/mall/promotion/goods/queryGoodsSkuList`,
            name: "查找SKU列表",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        delete:{
            url: `${config.API_URL}/main/mall/promotion/goods/delete`,
            name: "更新",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        }
    },
    schedule:{
        add: {
            url: `${config.API_URL}/main/mall/promotion/schedule/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/mall/promotion/schedule/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        saveOrUpdate: {
            url: `${config.API_URL}/main/mall/promotion/schedule/saveOrUpdate`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
       delete: {
            url: `${config.API_URL}/main/mall/promotion/schedule/delete`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
    },

},
freight:{
    add: {
        url: `${config.API_URL}/main/mall/freight/add`,
        name: "查看",
        post: async function (data, config = {}) {
            return await http.post(this.url, data, config);
        }
    },
    detail: {
        url: `${config.API_URL}/main/mall/freight/detail`,
        name: "查看",
        post: async function (data, config = {}) {
            return await http.post(this.url, data, config);
        }
    },
    save: {
        url: `${config.API_URL}/main/mall/freight/saveOrUpdate`,
        name: "保存",
        post: async function (data, config = {}) {
            return await http.post(this.url, data, config);
        }
    },
    update: {
        url: `${config.API_URL}/main/mall/freight/saveOrUpdate`,
        name: "更新",
        post: async function (data, config = {}) {
            return await http.post(this.url, data, config);
        }
    },
    addSubTable: {
        url: `${config.API_URL}/main/mall/freight/addSubTable`,
        name: "查看",
        post: async function (data, config = {}) {
            return await http.post(this.url, data, config);
        }
    },
    detailSubTable: {
        url: `${config.API_URL}/main/mall/freight/detailSubTable`,
        name: "查看",
        post: async function (data, config = {}) {
            return await http.post(this.url, data, config);
        }
    },
    saveOrUpdateSubTable: {
        url: `${config.API_URL}/main/mall/freight/saveOrUpdateSubTable`,
        name: "保存",
        post: async function (data, config = {}) {
            return await http.post(this.url, data, config);
        }
    },
   deleteSubTable: {
        url: `${config.API_URL}/main/mall/freight/deleteSubTable`,
        name: "更新",
        post: async function (data, config = {}) {
            return await http.post(this.url, data, config);
        }
    },
}
    
    
    
}